<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        var g, s, b, sum;
        for (i = 100; i <= 999; i++) {
            g = parseInt(i % 10);
            s = parseInt(i / 10 % 10);
            b = parseInt(i / 100);
            sum = g * g * g + s * s * s + b * b * b;
            if (sum == i) {
                console.log(i);
            }
            sum = 0;
        }
    </script>
</body>

</html>